﻿using Microsoft.AspNetCore.Mvc;

namespace PageOffice6_Net_Core.Controllers.ReadOnly
{
    public class ReadOnlyController : Controller
    {
        public IActionResult Word()
        {
            PageOfficeNetCore.PageOfficeCtrl poCtrl = new PageOfficeNetCore.PageOfficeCtrl(Request);
            poCtrl.AllowCopy = false;//禁止拷贝

            //打开Word文档
            poCtrl.WebOpen("doc/template.doc", PageOfficeNetCore.OpenModeType.docReadOnly, "tom");
            ViewBag.poCtrl = poCtrl.GetHtml();

            return View();
        }
    }
}